# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libmwaw
pkgver=0.3.22
pkgrel=0
pkgdesc="Import filter and tools for old Mac documents"
url="https://sourceforge.net/projects/libmwaw/"
arch="all"
license="MPL-2.0"
makedepends="librevenge-dev zlib-dev doxygen"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://downloads.sourceforge.net/project/libmwaw/libmwaw/libmwaw-$pkgver/libmwaw-$pkgver.tar.bz2"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	amove usr/bin
}

sha512sums="
6aac61c062f512c7c2f1a46034752980f25b885927e53d0362b3fad0524169445f5041e49d434fb0785a14cee2052a5cca6bfc78efdc073ff63b3036e2ad0524  libmwaw-0.3.22.tar.bz2
"
